<template>
  <div>
    
    <div class="tiao">
    <router-view></router-view>
    <van-tabbar v-model="active" route:fixed="true">
      <van-tabbar-item  to="/home" icon="home-o">主页</van-tabbar-item>
      <van-tabbar-item to="/parkingRecord" icon="records">停车记录</van-tabbar-item>
      <van-tabbar-item to="/berth" icon="logistics">泊位状态</van-tabbar-item>
      <van-tabbar-item to="/my" icon="user-o">我的</van-tabbar-item>
    </van-tabbar>
    </div>
  </div>
</template>

<script>
export default {
  

   name: 'tiao',
    data() {
        return {
            active: 0
        }
    },

    created() {
            console.log(this.$route);//打印当前路由属性
            if (this.$route.path === '/main/') {
                this.$router.push('/home');
            }
        },
 


  methods: {
    onClickLeft() {
      Toast("返回");
    },
    onClickRight() {
      Toast("按钮");
    },
  }
};
</script>
<style>
#echars {
  height: 200px;
  width: 350px;
  margin-top: 50px;
}
</style>


